Returns the root directory from a path. For example, 'C:\' is returned from the C:\Testing path.
Universal Naming Convention (UNC) paths to network directories can also be used, such as \\ComputerName\SharedFolder\.
Syntax
FileRootDirectoryName("FilePath")
Arguments
| Argument | Description |
|---|---|
| FilePath | Full path to the file or directory. |
Return value
| Value | Description |
|---|---|
| Value | Root directory from the path. |
| \\ | Root directory from the UNC network directory. |
| <Empty string> | Path does not include a root directory. |
Example
FileRootDirectoryName("C:\\Testing\\Output.txt")